package com.esender.search.utils;

import com.esender.common.model.StandardReport;

import java.time.LocalDateTime;

public class SearchUtils {
    public static final String INDEX = "sms_submit_log_";
    private static ThreadLocal<StandardReport> standardReportThreadLocal = new ThreadLocal<>();

    public static String getYear() {
        return LocalDateTime.now().getYear()+"";
    }

    public static String getCurrYearIndex() {

        return INDEX + LocalDateTime.now().getYear();
    }
    public static void set(StandardReport standardReport){
        standardReportThreadLocal.set(standardReport);
    }
    public static StandardReport get(){
        return standardReportThreadLocal.get();
    }
    public static void remove(){
        standardReportThreadLocal.remove();
    }
}
